How to redirect all AMP pages to non AMP pages

您所在的位置:网站首页 an interesting job课文主旨 How to redirect all AMP pages to non AMP pages

How to redirect all AMP pages to non AMP pages

2023-10-16 22:31| 来源: 网络整理| 查看: 265

You are using an AMP plugin for WordPress but have decided to deactivate it.

The problem: errors relating to AMP go up in Google Search Console.

In order to prevent AMP URLs ending in /amp from returning a 404 error, it is best to redirect them to the original article by applying a regular expression to all the pages of your site.

Redirect all AMP pages to non AMP pages with SEOPress PRO

It’s super easy to handle this with our SEOPress PRO WordPress plugin.

Simply go to your WordPress administration, SEO, Redirections.

Add a new redirect.

Enter this as a title:

(.*)/amp$

Then check Enable redirection and Regex options.

Choose All as a login status and 301 for the type.

Finally, enter this in the URL redirection field:

https://example.com/$1

And click Publish button.

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3